﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;

namespace housingsafety.server.Models
{

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageHouseRequestInput_yt
    {
        /// <summary>
        /// 地址
        /// </summary>
        public string Text { get; set; } = "null";

        /// <summary>
        /// 房屋状态((0-未排查,1排查中,2已排查,3不需要排查)
        /// </summary>
        public int? pczt { get; set; } =9;

        /// <summary>
        /// 编号楼栋编号
        /// </summary>
        public string build_no { get; set; }

        /// <summary>
        /// 是否老旧小区改造
        /// </summary>
        public int? sfljxjgz { get; set; } = -1;
        /// <summary>
        /// 楼名称
        /// </summary>
        public string build_name { get; set; }

        /// <summary>
        /// 建成年代
        /// </summary>
        public string jcnd { get; set; }
        /// <summary>
        /// 产权人
        /// </summary>
        public string ownername { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;
        public List<SimpleDepartmentDto> Districts { get; set; }
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageHouseRequestInput
    {
        /// <summary>
        /// 地址
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 住建排查状态(0-未排查,1-排查中,20-已排查无隐患,21-已排查有隐患,3不需要排查)
        /// </summary>
        public int? PcztHousing { get; set; }

        /// <summary>
        /// 消防排查状态(0-未排查,1-排查中,20-已排查无隐患,21-已排查有隐患,3不需要排查)
        /// </summary>
        public int? PcztFire { get; set; }

        /// <summary>
        /// 公安排查状态(0-未排查,1-排查中,20-已排查无隐患,21-已排查有隐患,3不需要排查)
        /// </summary>
        public int? PcztPolice { get; set; }

        /// <summary>
        /// 房屋编号
        /// </summary>
        public string Fwbh { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageHouseRequestInput2
    {
        
        public List<string> create_on { get; set; }

        public List<string> modified_on { get; set; }
        /// <summary>
        /// 777村专项(0-市级挂账,1-区级挂账,2-未挂账)
        /// </summary>
        public int? Check777 { get; set; }

        /// <summary>
        /// 777村专项(0-市级挂账,1-区级挂账,2-未挂账)
        /// </summary>
        public int? Check108 { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 住建排查状态(0-未排查,1-排查中,20-已排查无隐患,21-已排查有隐患,3不需要排查)
        /// </summary>
        public int? PcztHousing { get; set; }

        /// <summary>
        /// 消防排查状态(0-未排查,1-已排查)
        /// </summary>
        public int? Pc_status { get; set; }

        /// <summary>
        /// 公安排查状态(0-未排查,1-排查中,20-已排查无隐患,21-已排查有隐患,3不需要排查)
        /// </summary>
        public int? PcztPolice { get; set; }

        /// <summary>
        /// 消防(1-严重隐患;2-无隐患;3-一般隐患)
        /// </summary>
        public int? LevelFire { get; set; }

        /// <summary>
        /// 房屋编号
        /// </summary>
        public string Fwbh { get; set; }

        /// <summary>
        /// 行政区划
        /// </summary>
        public List<SimpleDepartmentDto> Districts { get; set; }

        /// <summary>
        /// 建筑层数>
        /// </summary>
        public int? BuildingStorey { get; set; }

        /// <summary>
        /// 出租房间数>
        /// </summary>
        public int? RentNum { get; set; }

        /// <summary>
        /// 出租房间居住人数>
        /// </summary>
        public int? RentPeople { get; set; }

        /// <summary>
        /// 疏散楼梯少于
        /// </summary>
        public int? EvaStairs { get; set; }

        /// <summary>
        /// 首层安全出口少于
        /// </summary>
        public int? FirstFloorFireExits { get; set; }

        /// <summary>
        /// 消防居住过滤参数
        /// </summary>
        public FireResidentFilter FireResidentFilter { get; set; }

        /// <summary>
        /// 消防商业过滤参数
        /// </summary>
        public FireCommercialFilter FireCommercialFilter { get; set; }

        /// <summary>
        /// 公安居住隐患过滤参数
        /// </summary>
        public List<string> GAResidentFilter { get; set; }

        /// <summary>
        /// 公安商业隐患过滤参数
        /// </summary>
        public List<string> GACommercialFilter { get; set; }

        /// <summary>
        /// 场所类型(0-居住/1-商业)
        /// </summary>
        public int? PlaceType { get; set; }

        /// <summary>
        /// 公安场所类型(0-居住/1-商业)
        /// </summary>
        public int? PlaceTypeGa { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;
    }

    public class FireResidentFilter
    {
        /// <summary>
        /// 电动自行车、电动平衡车及其蓄电池在房屋公共区域、疏散走道、楼梯间、安全出口或房间内停放、充电
        /// </summary>
        [Column("use_electric_bicycle")]
        public bool? UseElectricBicycle { get; set; }
        /// <summary>
        /// 出租房屋的公共区域、租住房间内、地下室、半地下室使用瓶装液化石油气
        /// </summary>
        [Column("use_bottled_liquefied_gas")]
        public bool? UseBottledLiquefiedGas { get; set; }
        /// <summary>
        /// 疏散走道、楼梯间、安全出口处堆放物品影响人员疏散
        /// </summary>
        [Column("use_stacked_items")]
        public bool? UseStackedItems { get; set; }
        /// <summary>
        /// 外窗、疏散走道安装防盗网、广告牌、铁栅栏等影响逃生和灭火救援的障碍物
        /// </summary>
        [Column("use_burglar_mesh")]
        public bool? UseBurglarMesh { get; set; }
        /// <summary>
        /// 供人员疏散的场院、内院、天井设置不利于烟气扩散的顶棚、雨棚等
        /// </summary>
        [Column("use_ceiling")]
        public bool? UseCeiling { get; set; }
        /// <summary>
        /// 居住区域与生产、经营、存储区域未使用实体砖墙、防火门等进行完全分隔，同时居住区域未设置直通室外的独立疏散楼梯、安全出口
        /// </summary>
        [Column("is_completely_isolated")]
        public bool? IsCompletelyIsolated { get; set; }
        /// <summary>
        /// 屋顶、围护结构、房间隔墙使用易燃可燃夹芯彩钢板搭建，疏散通道使用易燃可燃材料装修
        /// </summary>
        [Column("use_flammable_materials")]
        public bool? UseFlammableMaterials { get; set; }
        /// <summary>
        /// 在供电设施上擅自接线用电，擅自在导线上接用电器设备
        /// </summary>
        [Column("unauthorized_electrical_connect")]
        public bool? UnauthorizedElectricalConnect { get; set; }
        /// <summary>
        /// 电动自行车集中充电设施未按照农村地区电动自行车集中充电设施建设指引要求建设或整改
        /// </summary>
        [Column("charging_facilities_no_standard")]
        public bool? ChargingFacilitiesNoStandard { get; set; }
        /// <summary>
        /// 出租房屋3层及以上出租住人，且不满足2部疏散楼梯和首层2个安全出口
        /// </summary>
        [Column("not_enough_exits")]
        public bool? NotEnoughExits { get; set; }
        /// <summary>
        /// 采用易燃可燃保温材料的冷库、设置液氮制冷剂的冷库的自建房设置居住场所
        /// </summary>
        [Column("use_flammable_insulation_materials")]
        public bool? UseFlammableInsulationMaterials { get; set; }
        /// <summary>
        /// 生产、储存、经营易燃易爆危险品的自建房设置居住场所
        /// </summary>
        [Column("use_flammable_dangerous_goods")]
        public bool? UseFlammableDangerousGoods { get; set; }
        /// <summary>
        /// 3层及3层以上建筑是否仅房主自住使用
        /// </summary>
        [Column("above_three_floor_self")]
        public bool? AboveThreeFloorSelf { get; set; }
        /// <summary>
        /// 所有自建房出租房间是否设置联网型独立感烟报警器，以及简易喷淋灭火系统
        /// </summary>
        [Column("use_independent_smoke_alarm")]
        public bool? UseIndependentSmokeAlarm { get; set; }
        /// <summary>
        /// 3层及以上全部房间是否配备逃生绳、配备灭火器
        /// </summary>
        [Column("above_three_floors_escape")]
        public bool? AboveThreeFloorsEscape { get; set; }
    }

    public class FireCommercialFilter
    {
        /// <summary>
        /// 电动自行车、电动平衡车及其蓄电池在房屋公共区域、疏散走道、楼梯间、安全出口或房间内停放、充电
        /// </summary>
        [Column("use_electric_bicycle")]
        public bool? UseElectricBicycle { get; set; }
        /// <summary>
        /// 出租房屋的公共区域、租住房间内、地下室、半地下室使用瓶装液化石油气
        /// </summary>
        [Column("use_bottled_liquefied_gas")]
        public bool? UseBottledLiquefiedGas { get; set; }
        /// <summary>
        /// 疏散走道、楼梯间、安全出口处堆放物品影响人员疏散
        /// </summary>
        [Column("use_stacked_items")]
        public bool? UseStackedItems { get; set; }
        /// <summary>
        /// 外窗、疏散走道安装防盗网、广告牌、铁栅栏等影响逃生和灭火救援的障碍物
        /// </summary>
        [Column("use_burglar_mesh")]
        public bool? UseBurglarMesh { get; set; }
        /// <summary>
        /// 供人员疏散的场院、内院、天井设置不利于烟气扩散的顶棚、雨棚等
        /// </summary>
        [Column("use_ceiling")]
        public bool? UseCeiling { get; set; }
        /// <summary>
        /// 居住区域与生产、经营、存储区域未使用实体砖墙、防火门等进行完全分隔，同时居住区域未设置直通室外的独立疏散楼梯、安全出口
        /// </summary>
        [Column("is_completely_isolated")]
        public bool? IsCompletelyIsolated { get; set; }
        /// <summary>
        /// 屋顶、围护结构、房间隔墙使用易燃可燃夹芯彩钢板搭建，疏散通道使用易燃可燃材料装修
        /// </summary>
        [Column("use_flammable_materials")]
        public bool? UseFlammableMaterials { get; set; }
        /// <summary>
        /// 在供电设施上擅自接线用电，擅自在导线上接用电器设备
        /// </summary>
        [Column("unauthorized_electrical_connect")]
        public bool? UnauthorizedElectricalConnect { get; set; }
        /// <summary>
        /// 疏散通道或安全出口数量不足或严重堵塞
        /// </summary>
        [Column("not_enough_exits")]
        public bool? NotEnoughExits { get; set; }
        /// <summary>
        /// 建筑消防设施严重损坏
        /// </summary>
        [Column("fire_service_damaged")]
        public bool? FireServiceDamaged { get; set; }
        /// <summary>
        /// 人员密集场所违规使用、储存易燃易爆危险品
        /// </summary>
        [Column("use_store_dangerous_goods")]
        public bool? UseStoreDangerousGoods { get; set; }
        /// <summary>
        /// 其他可能严重威胁公共安全的火灾隐患
        /// </summary>
        [Column("threaten_safety_fire_hazards")]
        public bool? ThreatenSafetyFireHazards { get; set; }
        /// <summary>
        /// 采用易燃可燃保温材料的冷库、设置液氮制冷剂的冷库的自建房设置居住场所
        /// </summary>
        [Column("use_flammable_insulation_materials")]
        public bool? UseFlammableInsulationMaterials { get; set; }
        /// <summary>
        /// 生产、储存、经营易燃易爆危险品的自建房设置居住场所
        /// </summary>
        [Column("use_flammable_dangerous_goods")]
        public bool? UseFlammableDangerousGoods { get; set; }
        /// <summary>
        /// 3层及3层以上建筑是否仅房主自住使用
        /// </summary>
        [Column("above_three_floor_self")]
        public bool? AboveThreeFloorSelf { get; set; }
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageTaskRequestInput
    {
        /// <summary>
        /// 任务包名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 调查单位名称
        /// </summary>
        public string SurveyUnitName { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;


        /// <summary>
        /// 自建房类型
        /// </summary>
        public int ZjfType { get; set; }=2;
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageTaskHouseRequestInput
    {
        /// <summary>
        /// 查询文本
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 房屋编号
        /// </summary>
        public string Fwbh { get; set; }

        /// <summary>
        /// 核查结果(1/0:正确/不正确)
        /// </summary>
        public int? Result { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageCityTaskHouseRequestInput
    {
        /// <summary>
        /// 地址
        /// </summary>
        public string Addr { get; set; }

        /// <summary>
        /// 房屋编号
        /// </summary>
        public string Fwbh { get; set; }

        /// <summary>
        /// 核查结果(0/1/2/3:全部/正确/不正确/未核查)
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;

        /// <summary>
        /// 自建房类型
        /// </summary>
        public int ZjfType { get; set; } = 2;

    }


    /// <summary>
    /// 房屋列表
    /// </summary>
    public class Fwlb
    {


        /// <summary>
        /// 排序字段（0-房屋编号;1-房屋地址；2-自查状态；3检查状态）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = false;

        public string text { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int? pczt { get; set; }

        public int? zczt { get; set; }

        public int? ispc { get; set; }//是否检查   1是0否

        public int? iszc { get; set; }//是否自查 1是0否


        public string Towndm { get; set; }

        public string Xzqdm { get; set; }
        public string Villagedm { get; set; }
        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PagePcztRequestInput
    {
        /// <summary>
        /// 查询文本
        /// </summary>
        public string Text { get; set; }

       
        public string? cked { get; set; }
        public int? Pczt { get; set; }

        public string startime { get; set; }

        public string endtime { get; set; }

        /// <summary>
        /// 隐患来源
        /// </summary>
        public int? Yhly { get; set; }
        /// <summary>
        /// 行政区编码
        /// </summary>
        public string xzqdm { get; set; }

        /// <summary>
        /// 行政区编码
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;
    }


    public class PageProgressRequestInput
    {
        /// <summary>
        /// 查询文本
        /// </summary>
        public string? Xzq { get; set; }

        /// <summary>
        /// 乡镇名称
        /// </summary>
        public string? Town { get; set; }

        public string? startTime { get; set; }  //开始时间

        public string? endTime { get; set; }  //结束时间


        public string? roletype { get; set; }  //结束时间

        public string? nickname { get; set; }  //核验人员姓名

        public string? cs { get; set; }  //cs

        public string? cked { get; set; }  //cked

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;
    }


    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageRequestInput
    {
        /// <summary>
        /// 查询文本
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageUserRequestInput
    {
        /// <summary>
        /// 角色类型
        /// </summary>
        public PermissionRoleType RoleType { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageUserNameRequestInput
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string Uname { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Nickname { get; set; }

        /// <summary>
        /// 管辖区域
        /// </summary>
        public string Jurisdiction { get; set; }

      
        /// <summary>
        /// 行政区划
        /// </summary>
        public List<SimpleDepartmentDto> Districts { get; set; }
        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 房屋编号
        /// </summary>
        public string Fwbh { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Add { get; set; }
        /// <summary>
        /// 户主姓名
        /// </summary>
        public string fzxm { get; set; }

        /// <summary>
        /// 行政区划
        /// </summary>
        public string xzq { get; set; }

        /// <summary>
        /// 行政区划
        /// </summary>
        public string disabled { get; set; }

        /// <summary>
        /// 行政区划
        /// </summary>
        public string roletype { get; set; }
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageUserNameRequestInput2
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string Uname { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Nickname { get; set; }

        /// <summary>
        /// 管辖区域
        /// </summary>
        public List<SimpleDepartmentDto> JurisdictionCodes { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;
    }

    /// <summary>
    /// 分页查询
    /// </summary>
    public class PageVillagePcztRequestInput
    {
        /// <summary>
        /// 查询文本
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 排查状态(0-未排查,1排查中,2已排查)
        /// </summary>
        public int? Pczt { get; set; }



        /// <summary>
        /// 排查状态(777=777村,107=107村)
        /// </summary>
        public int? type { get; set; }


        /// <summary>
        /// 排查状态(777=777村,107=107村)
        /// </summary>
        public int? check777 { get; set; }
        /// <summary>
        /// 排查状态(0-315前(副本不变数据),1-315后(正本))
        /// </summary>
        public int? check315 { get; set; }

        /// <summary>
        /// 行政区划
        /// </summary>
        public List<SimpleDepartmentDto> Districts { get; set; }

        /// <summary>
        /// 页码从0开始
        /// </summary>
        public int PageIndex { get; set; } = 0;

        /// <summary>
        /// 每页个数
        /// </summary>
        public int Limit { get; set; } = 50;

        /// <summary>
        /// 排序字段（0-名称;1-更新日期）
        /// </summary>
        public int OrderBy { get; set; } = 0;

        /// <summary>
        /// 是否降序排序
        /// </summary>
        public bool OrderDesc { get; set; } = true;
    }
}
